﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
        <title>Phuntid!</title>            
    </head>
<body>
<style type="text/css"> 
  div {font-family: sans-serif;}
  a:hover {text-docoration: none; color:red;}
  a {text-decoration: none;}
</style>
<div id="page">
  <center>
    <div style="width:900px; text-align:left;">
    {% if siteview %}
      <div style="float:left; width:100%; font-size:50px;margin-top:150px;">Add new</div>     
      <form action="/add" method="post" enctype="application/x-www-form-urlencoded">
        <input type="text" name="url" id="url" value="" style="font-size:40px; width:714px;"/>
        <input type="checkbox" name="crawl" id="crawl" style="height:53px;position:relative;top:13px;width:53px;" checked="checked"/> <label style="font-size:40px;" for="crawl">crawl?</label>
      </form>
      <div style="float:left; width:100%; font-size:50px;margin-top:20px;">Sites:</div>     
      
      {% for s in sites %}
        <div style="float:left; width:100%; font-size:36px; margin-top:5px;"><a href="/view?key={{ s.key }}">{{ s.url }}</a>
        <a href="/delete?key={{s.key}}" style="float: right; color: red; border: 1px solid red; padding-left:4px; padding-right: 4px; margin-left:10px;"> X </a>
        {% if s.crawl%} <span style="float:right; color: green;"> C </span> {% endif %}
        
        </div> 
      {% endfor %}
      
      
    {% else %}
      <link rel="alternate" type="application/rss+xml" title="Phuntid from {{site.url}}" href="{{host}}/feed?key={{site.key}}"/> 
      
      {% if pp %} 
      <div style="float:left; width:100%; font-size:50px;margin-top:10px;">
        <a style="float:left;" href="/">home</a>
        
        {% if next %} 
        <a style="float:right; margin-left:30px;" href="/view?key={{ site.key }}&offset={{next}}">next</a>
        {% endif %}
        {% if prev %} 
        <a style="float:right;" href="/view?key={{ site.key }}&offset={{prev}}">prev</a>
        {% endif %}
      </div>
      
      <div style="float:left; width:100%; font-size:25px;margin-top:30px;"> Site: <a href="{{pp.url}}">{{site.url}}</a> </div>
      <div style="float:left; width:100%; font-size:20px;margin-top:5px;margin-bottom:5px;"> Source: <a href="{{pp.url}}">{{pp.url}}</a> </div>
      
          {{pics}}
        
      <div style="float:left; width:100%; font-size:50px;margin-top:10px;">
        <a style="float:left;" href="/">home</a>
        
        {% if next %} 
        <a style="float:right; margin-left:30px;" href="/view?key={{ site.key }}&offset={{next}}">next</a>
        {% endif %}
        {% if prev %} 
        <a style="float:right;" href="/view?key={{ site.key }}&offset={{prev}}">prev</a>
        {% endif %}
      </div>    

    {% else %}
    <div style="float:left; width:100%; font-size:50px;margin-top:10px;">
        <a style="float:left;" href="/">home</a>
    </div>
    <div style="float:left; width:100%; font-size:25px;margin-top:30px;"> Site: <a href="{{pp.url}}">{{site.url}}</a> </div>
    <div style="float:left; width:100%; font-size:20px;margin-top:5px;margin-bottom:5px;"> No pics yet! </div>
       
      
    {% endif %}
    
    
    {% endif %}
    </div>
  </center>
</div>

</body>
</html>